<!DOCTYPE html>
<html>
<head>
    <title>{$article.name|default=''} - 校区详情</title>
    <meta name="keywords" content="{$site_info.site_seo_keywords|default=''}"/>
    <meta name="description" content="{$site_info.site_seo_description|default=''}">
    <include file="public@head"/>
    <style>
        #article_content img {
            height: auto !important;
            max-width: 100%;
        }

        #article_content {
            word-wrap: break-word;
        }
    </style>
    <hook name="before_head_end"/>
</head>
<body class="body-white">
<include file="public@nav"/>
<div class="container tc-main">
    <div class="row">
        <div class="col-md-9">
            <div class="tc-box article-box">
                <h2>{$param.name|default=''} - 校区详情</h2>
                <div class="article-infobox">
                    <span>
		    			
					</span>
                </div>
                <hr>
                <div id="article_content">
                    <div class="row">
						<div class="col-md-6">
							<div class="col-md-12">
								<h3><label>电话：</label>{$param['tel']|default=''}</h3>
							</div>
							<div class="col-md-12">
								<h3><label>地址：</label>{$param['address']|default=''}</h3>
							</div>
							<div class="col-md-12">
								<h3><label>邮编：</label>{$param['zip']|default=''}</h3>
							</div>
						</div>
						<div class="col-md-6">
							<div id="allmap" style="height:300px"></div>
						</div>
					</div>
                </div>
            </div>


        </div>
        <div class="col-md-3">
            <div class="tc-box first-box">
                <div class="headtitle">
                    <h2>热门文章</h2>
                </div>
                <div class="ranking">
                    <php>
                        $hot_articles=[];
                    </php>
                    <ul class="list-unstyled">
                        <portal:articles limit="5" order="post.post_hits DESC">
                            <php>$top=$key<3?"top3":"";</php>
                            <li class="{$top}">
                                <i>{$key+1}</i>
                                <a title="{$vo.post_title}"
                                   href="{:url('portal/article/index',array('id'=>$vo['id']))}">
                                    {$vo.post_title}
                                </a>
                            </li>
                        </portal:articles>
                    </ul>
                </div>
            </div>

        </div>

    </div>

    <include file="public@footer"/>
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=T3boKpXs1YHVgFhFBuljeOsHltRqE5U4"></script>
<script type="text/javascript">
	// 百度地图API功能
	var map = new BMap.Map("allmap");
	map.enableScrollWheelZoom();    //启用滚轮放大缩小，默认禁用  
    map.enableContinuousZoom();    //启用地图惯性拖拽，默认禁用  
    map.addControl(new BMap.NavigationControl());  //添加默认缩放平移控件  
    map.addControl(new BMap.OverviewMapControl()); //添加默认缩略地图控件
	map.centerAndZoom(new BMap.Point({$param['lng']}, {$param['lat']}),15);   
	map.clearOverlays();//清空原来的标注 
	var p2 = new BMap.Point({$param['lng']}, {$param['lat']});
	var marker = new BMap.Marker(p2);  // 创建标注，为要查询的地方对应的经纬度 
	map.addOverlay(marker);
	var infowindow = new BMap.InfoWindow("{$param['name']}");
	marker.openInfoWindow(infowindow);
	<!-- marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画   -->
	// 添加带有定位的导航控件
  var navigationControl = new BMap.NavigationControl({
    // 靠左上角位置
    anchor: BMAP_ANCHOR_TOP_LEFT,
    // LARGE类型
    type: BMAP_NAVIGATION_CONTROL_LARGE,
    // 启用显示定位
    enableGeolocation: true
  });
  map.addControl(navigationControl);
  // 添加定位控件
  var geolocationControl = new BMap.GeolocationControl();
  geolocationControl.addEventListener("locationSuccess", function(e){
    // 定位成功事件
    var address = '';
    address += e.addressComponent.province;
    address += e.addressComponent.city;
    address += e.addressComponent.district;
    address += e.addressComponent.street;
    address += e.addressComponent.streetNumber;
	marker.closeInfoWindow();
	var driving = new BMap.DrivingRoute(map, {renderOptions:{map: map, autoViewport: true}});
		driving.search(e.point,p2);
	  });
  geolocationControl.addEventListener("locationError",function(e){
    // 定位失败事件
    alert(e.message);
  });
  map.addControl(geolocationControl);
	
</script>
<include file="public@scripts"/>
<hook name="before_body_end"/>
</body>
</html>